package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.account.service.MarketingDubboService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author zq
 * @Date 2017/12/15
 */
@Slf4j
@Component
public class MarketingPrizeOrderJobTigger {

    @Reference(version = "1.0.0")
    MarketingDubboService marketingDubboService;

    @Scheduled(cron = "${prize.resend-prize}")
    public void resendPrize(){
        log.info("现金红包补发job");
        marketingDubboService.resendPrize();
    }

    @Scheduled(cron = "${prize.query-prize}")
    public void queryTransactionPrize(){
        log.info("查询营销红包订单job");
        marketingDubboService.queryTransactionPrize();
    }
}
